package com.uphone.kingmall.bean;

import java.util.ArrayList;
import java.util.List;

/**
 * <pre>
 *     author : radish
 *     e-mail : 15703379121@163.com
 *     time   : 2019/3/23
 *     desc   :
 * </pre>
 */
public class SubmitOrderBean {
    private String shopCarIds;
    private String addrId;
    private String payType;
    private String paypass;
    private String orderFee;
    private List<ShopsBean> shops;

    public String getShopCarIds() {
        return shopCarIds;
    }

    public void setShopCarIds(String shopCarIds) {
        this.shopCarIds = shopCarIds;
    }

    public String getAddrId() {
        return addrId;
    }

    public void setAddrId(String addrId) {
        this.addrId = addrId;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    public String getPaypass() {
        return paypass;
    }

    public void setPaypass(String paypass) {
        this.paypass = paypass;
    }

    public String getOrderFee() {
        return orderFee;
    }

    public void setOrderFee(String orderFee) {
        this.orderFee = orderFee;
    }

    public List<ShopsBean> getShops() {
        return shops;
    }

    public void setShops(List<ShopsBean> shops) {
        this.shops = shops;
    }

    public static class ShopsBean {
        private String shopId;
        private int postType;
        private String deductionType;
        private String deduction;
        private String userRemark;
        private List<GoodsBean> goods;
        private int installationType;

        public ShopsBean(SettleCartBean.ShopGoodsBean bean) {
            shopId = bean.getShopId() + "";
            postType = bean.getPostType();
            installationType = bean.getInstallationType();
            deductionType = bean.isYueFeeSelect() ? "1" : (bean.isScoreFeeSelect() ? "2" : "0");
            deduction = bean.isYueFeeSelect() ? bean.getYueDeductFee() + "" : (bean.isScoreFeeSelect() ? bean.getScoreDeductFee() + "" : "0");
            userRemark = bean.getRemark();
            goods = new ArrayList<>();
            for (int i = 0; i < bean.getGoods().size(); i++) {
                goods.add(new GoodsBean(bean.getGoods().get(i)));
            }
        }

        public String getShopId() {
            return shopId;
        }

        public void setShopId(String shopId) {
            this.shopId = shopId;
        }

        public int getPostType() {
            return postType;
        }

        public void setPostType(int postType) {
            this.postType = postType;
        }

        public int getInstallationType() {
            return installationType;
        }

        public void setInstallationType(int installationType) {
            this.installationType = installationType;
        }

        public String getDeductionType() {
            return deductionType;
        }

        public void setDeductionType(String deductionType) {
            this.deductionType = deductionType;
        }

        public String getDeduction() {
            return deduction;
        }

        public void setDeduction(String deduction) {
            this.deduction = deduction;
        }

        public String getUserRemark() {
            return userRemark;
        }

        public void setUserRemark(String userRemark) {
            this.userRemark = userRemark;
        }

        public List<GoodsBean> getGoods() {
            return goods;
        }

        public void setGoods(List<GoodsBean> goods) {
            this.goods = goods;
        }

        public static class GoodsBean {
            private String goodsId;
            private String goodsPropId;
            private String goodsNum;

            public GoodsBean(SettleCartBean.ShopGoodsBean.GoodsBean bean) {
                goodsId = "" + bean.getGoodsId();
                goodsPropId = bean.getGoodsPropId();
                goodsNum = bean.getGoodsNum() + "";
            }

            public String getGoodsId() {
                return goodsId;
            }

            public void setGoodsId(String goodsId) {
                this.goodsId = goodsId;
            }

            public String getGoodsPropId() {
                return goodsPropId;
            }

            public void setGoodsPropId(String goodsPropId) {
                this.goodsPropId = goodsPropId;
            }

            public String getGoodsNum() {
                return goodsNum;
            }

            public void setGoodsNum(String goodsNum) {
                this.goodsNum = goodsNum;
            }
        }
    }
}
